Integrand size = 23, antiderivative size = 222 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{a f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {\operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}}-\frac {b \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{a f \sqrt {a+b \sin (e+f x)}} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.391, Rules used = {2881, 3139, 2734, 2732, 3081, 2742, 2740, 2886, 2884} \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=-\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}+\frac {\sqrt {\frac {a+b \sin (e+f x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{f \sqrt {a+b \sin (e+f x)}}-\frac {\sqrt {a+b \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{a f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}-\frac {b \sqrt {\frac {a+b \sin (e+f x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{a f \sqrt {a+b \sin (e+f x)}} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2881
Rule 2884
Rule 2886
Rule 3081
Rule 3139
Rubi steps \begin{align*} \text {integral}& = -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}+\frac {\int \frac {\csc (e+f x) \left (-\frac {b}{2}-\frac {1}{2} b \sin ^2(e+f x)\right )}{\sqrt {a+b \sin (e+f x)}} \, dx}{a} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}-\frac {\int \sqrt {a+b \sin (e+f x)} \, dx}{2 a}-\frac {\int \frac {\csc (e+f x) \left (\frac {b^2}{2}-\frac {1}{2} a b \sin (e+f x)\right )}{\sqrt {a+b \sin (e+f x)}} \, dx}{a b} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}+\frac {1}{2} \int \frac {1}{\sqrt {a+b \sin (e+f x)}} \, dx-\frac {b \int \frac {\csc (e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx}{2 a}-\frac {\sqrt {a+b \sin (e+f x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}} \, dx}{2 a \sqrt {\frac {a+b \sin (e+f x)}{a+b}}} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{a f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {\sqrt {\frac {a+b \sin (e+f x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{2 \sqrt {a+b \sin (e+f x)}}-\frac {\left (b \sqrt {\frac {a+b \sin (e+f x)}{a+b}}\right ) \int \frac {\csc (e+f x)}{\sqrt {\frac {a}{a+b}+\frac {b \sin (e+f x)}{a+b}}} \, dx}{2 a \sqrt {a+b \sin (e+f x)}} \\ & = -\frac {\cot (e+f x) \sqrt {a+b \sin (e+f x)}}{a f}-\frac {E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (e+f x)}}{a f \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}+\frac {\operatorname {EllipticF}\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{f \sqrt {a+b \sin (e+f x)}}-\frac {b \operatorname {EllipticPi}\left (2,\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{a f \sqrt {a+b \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 9.91 (sec) , antiderivative size = 315, normalized size of antiderivative = 1.42 \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\frac {\frac {2 i \left (-2 a (a-b) E\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right )|\frac {a+b}{a-b}\right )+b \left (-2 a \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right ),\frac {a+b}{a-b}\right )+b \operatorname {EllipticPi}\left (\frac {a+b}{a},i \text {arcsinh}\left (\sqrt {-\frac {1}{a+b}} \sqrt {a+b \sin (e+f x)}\right ),\frac {a+b}{a-b}\right )\right )\right ) \sec (e+f x) \sqrt {-\frac {b (-1+\sin (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sin (e+f x))}{a-b}}}{a b \sqrt {-\frac {1}{a+b}}}-4 \cot (e+f x) \sqrt {a+b \sin (e+f x)}+\frac {6 b \operatorname {EllipticPi}\left (2,\frac {1}{4} (-2 e+\pi -2 f x),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (e+f x)}{a+b}}}{\sqrt {a+b \sin (e+f x)}}}{4 a f} \]
[In]
[Out]
Time = 1.38 (sec) , antiderivative size = 412, normalized size of antiderivative = 1.86
method | result | size |
default | \(\frac {\sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}\, \left (-\frac {\sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}{a \sin \left (f x +e \right )}-\frac {b \left (\frac {a}{b}-1\right ) \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {\frac {b \left (1-\sin \left (f x +e \right )\right )}{a +b}}\, \sqrt {\frac {b \left (-\sin \left (f x +e \right )-1\right )}{a -b}}\, \left (\left (-\frac {a}{b}-1\right ) E\left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right )+F\left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right )\right )}{a \sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}+\frac {b^{2} \left (\frac {a}{b}-1\right ) \sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}\, \sqrt {\frac {b \left (1-\sin \left (f x +e \right )\right )}{a +b}}\, \sqrt {\frac {b \left (-\sin \left (f x +e \right )-1\right )}{a -b}}\, \Pi \left (\sqrt {\frac {a +b \sin \left (f x +e \right )}{a -b}}, -\frac {\left (-\frac {a}{b}+1\right ) b}{a}, \sqrt {\frac {a -b}{a +b}}\right )}{a^{2} \sqrt {-\left (-b \sin \left (f x +e \right )-a \right ) \left (\cos ^{2}\left (f x +e \right )\right )}}\right )}{\cos \left (f x +e \right ) \sqrt {a +b \sin \left (f x +e \right )}\, f}\) | \(412\) |
[In]
[Out]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\int \frac {\csc ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sin {\left (e + f x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sin \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\int { \frac {\csc \left (f x + e\right )^{2}}{\sqrt {b \sin \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\csc ^2(e+f x)}{\sqrt {a+b \sin (e+f x)}} \, dx=\int \frac {1}{{\sin \left (e+f\,x\right )}^2\,\sqrt {a+b\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]